package com.imay.live.utils;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;

import com.imay.live.R;

/**
 * Created by  nick on 2017/4/11 0011.
 *
 */

public class DialogUtil {

    public static AlertDialog getNormalDialog(final Context context, String content, DialogInterface.OnClickListener comfirmListener){
        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        builder.setTitle(context.getResources().getString(R.string.warning));
        builder.setMessage(content);
        builder.setPositiveButton(context.getResources().getString(R.string.button_ok), comfirmListener);
        builder.setNegativeButton(context.getResources().getString(R.string.button_cancel), new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
            }
        });
        AlertDialog dialog=builder.create();
        return dialog;

    }
}
